/*
 * stat.cc
 *
 *  Created on: Dec 19, 2014
 *      Author: root
 */
/******************************************************************************************************************/
#include <string.h>
#include <stdio.h>
#include "stat.h"
#include "../util/define.h"
/******************************************************************************************************************/
Stat::Stat() {
	memset(this, 0, sizeof(Stat));
	this->cs_min_data = TCP_MAX_DATA;
	this->sc_min_data = TCP_MAX_DATA;
}
void Stat::ToString() {
	char info[INFO_LEN] = { 0 };
	sprintf(info, "%d, %d, %d, %d, %s", this->cs_pkts, this->cs_bytes,
			this->sc_pkts, this->sc_bytes, this->label);
	printf("%s\n", info);
}

void Stat::SetLabel(const char* label) {
	strcpy(this->label, label);
}
/******************************************************************************************************************/
